Note that the enthalpy of formation and free energy of formation for elements in their standard elemental states is 0.
The free energy for the reaction is the difference between the free energies of the products and the free energy of the reactants. The free energies of formation must be multiplied by the number of moles present.